﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Niazi.CRM.Business.Model
{
    [MetadataType(typeof(OrderMetadata))]
    [DisplayName("بارنامه")]
    [ScaffoldTable(true)]
    public partial class Order : IAuditable
    {
    }

    public class OrderMetadata
    {
        [Display(Name = "کد", Order = 10)]
        public object Id { get; set; }

        [Display(Name = "شهر مبدا", Order = 20)]
        public object CitySource { get; set; }

        [Display(Name = "شهر مقصد", Order = 30)]
        public object CityDestination { get; set; }

        [Display(Name = "هواپیمایی", Order = 40)]
        public object Airline { get; set; }

        [Display(Name = "روزنامه", Order = 50)]
        public object Newspaper { get; set; }

        [Display(Name = "نوع بسته بندی", Order = 60)]
        public object QuantityUnit { get; set; }

        [Display(Name = "تعداد", Order = 70)]
        public object Quantity { get; set; }

        [Display(Name = "وزن به کیلوگرم", Order = 80)]
        public object Weight { get; set; }

        [Display(Name = "نرخ هر واحد", Order = 90)]
        public object UnitPrice { get; set; }

        [Display(Name = "مبلغ کرایه", Order = 100)]
        public object OrderPrice { get; set; }

        [Display(Name = "هزینه تمبر و بارنامه", Order = 110)]
        public object StampPrice { get; set; }

        [Display(Name = "هزینه بسته بندی", Order = 120)]
        public object PackagingPrice { get; set; }

        [Display(Name = "هزینه حمل و نقل", Order = 130)]
        public object TransportPrice { get; set; }

        [Display(Name = "هزینه مالیات", Order = 140)]
        public object TaxPrice { get; set; }

        [Display(Name = "هزینه های متفرقه", Order = 150)]
        public object etcPrice { get; set; }

        [Display(Name = "تخفیف", Order = 160)]
        public object Discount { get; set; }

        [Display(Name = "جمع کل", Order = 170)]
        public object TotalPrice { get; set; }

        [Display(Name = "تاریخ سفارش", Order = 180)]
        [UIHint("set_date")]
        public object OrderDate { get; set; }

        [Display(Name = "حسابداری", Order = 190)]
        public object Accountings { get; set; }

        [Display(Name = "پرداختی ها", Order = 200)]
        public object Payments { get; set; }
        
        [DisplayName("آخرین اپراتور")]
        [Display(Order = 975)]
        [ReadOnly(true)]
        public object Operator { get; set; }

        [DisplayName("آخرین به روز رسانی")]
        [Display(Order = 985)]
        [ReadOnly(true)]
        public object LastUpdate { get; set; }

        [DisplayName("تاریخ ایجاد")]
        [Display(Order = 995)]
        [ReadOnly(true)]
        public object CreateDate { get; set; }
    }
}
